gtkwindow: Fix regression with fixed size windows
authorOlivier Fourdan <ofourdan@redhat.com>
Thu, 3 Mar 2016 16:47:35 +0000 (17:47 +0100)
committerOlivier Fourdan <ofourdan@redhat.com>
Thu, 3 Mar 2016 16:50:19 +0000 (17:50 +0100)
Previous commit to address the default size introduced a regression
with fixed size windows if no default size was given, the resulting
window would end up much smaller than its actual content.

gtk/gtkwindow.c

index 008f630094b882b1056901564179d65c9e9bae9c..8a3d74924114012f79cd537c1f941963c35c70b3 100644 (file)
@@ -9138,8 +9138,10 @@ gtk_window_compute_configure_request (GtkWindow    *window,
     {
       new_flags |= GDK_HINT_MAX_SIZE;
 
-      new_geometry.max_width = new_geometry.min_width = w;
-      new_geometry.max_height = new_geometry.min_height = h;
+      new_geometry.min_width = MAX (w, new_geometry.min_width);
+      new_geometry.max_width = new_geometry.min_width;
+      new_geometry.min_height = MAX (h, new_geometry.min_height);
+      new_geometry.max_height = new_geometry.min_height;
     }
 
   gtk_window_constrain_size (window,